<?php
/*
  $Id: stockview.php,v 1.1 2006/02/26

  osCommerce StockViewer with Quantity per Attribute

  Contribution based on:

  osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com

  Copyright (c) 2002 - 2006 osCommerce

  Released under the GNU General Public License
*/
/*
2007-06-24 no static info
*/
  require('includes/application_top.php');

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_ADMIN; ?>">
<title><?php echo TITLE; ?></title>
<script language="javascript" src="includes/general.js"></script>
<?php require(DIR_FS_TEMPLATE . 'scripts/javascript.php'); ?>
<link rel="stylesheet" href="<?php echo DIR_WS_TEMPLATE ?>css/style.css" type="text/css">
</head>
<body>

<?php require(DIR_FS_TEMPLATE . 'template.php'); ?>
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->
<table align="center" border="0" width="95%" cellpadding="0" cellspacing="0">
<tr>
<?php
/*
<td width="<?php echo BOX_WIDTH; ?>" valign="top">
<table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="0">
<!-- left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->
</table>
</td>
*/
?>
<!-- body_text //-->
    <td valign="top">

     <table border="0" width="100%" cellspacing="5" cellpadding="0">
      <tr>
        <td valign="top">
         <table border="0" width="100%" cellspacing="0" cellpadding="0">
          <tr>
            <td class="Heading1"><?php echo HEADING_TITLE; ?></td>
            <td align="right">&nbsp;</td>
          </tr>
        </table>
       </td>
      </tr>
      <tr>
        <td valign="top">
      <table width="100%" cellpadding="0" cellspacing="0">
<?
    echo "<tr><td>". TEXT_INFO_PRODUCTS_ID . "</td>\n";
    echo "<td>" . TEXT_INFO_PRODUCTS_NAME . "</td>\n";
    echo "<td>" . TEXT_INFO_PRODUCTS_MODEL . "</td>\n";
    echo "<td>" . TEXT_INFO_PRODUCTS_STATUS . "</td>\n";
    echo "<td>" . TEXT_INFO_PRODUCTS_TYPE . "</td>\n";
    echo "<td>" . TEXT_INFO_PRODUCTS_QUANTITY . "</td>\n";
    echo "<td>" . TEXT_INFO_PRODUCTS_TOTAL_QUANTITY . "</td>\n";
    echo "</tr><tr>\n";
    $result = mysql_query("SELECT * FROM products, products_description, products_attributes, products_options_values WHERE products.products_id = products_description.products_id and products.products_id = products_attributes.products_id and products_description.language_id='1' and products_description.language_id = '" . $languages_id . "' and products_attributes.options_values_id = products_options_values.products_options_values_id ORDER BY products_description.products_name");
    if ($row = mysql_fetch_array($result)) {
        do {
            echo "<td>&nbsp;".$row["products_id"]."</td>\n";
            echo "<td>".$row["products_name"]."</td>\n";
            echo "<td>".$row["products_model"]."</td>\n";
            echo "<td>".$row["products_status"]."</td>\n";
            echo "<td>".$row["products_options_values_name"]."</td>\n";
            echo "<td>".$row["options_quantity"]."</td>\n";
            echo "<td>".$row["products_quantity"]."</td>\n";
            echo "</tr>\n";
        }
        while($row = mysql_fetch_array($result));
    }
    echo "</table>\n";
?>
    </td>
<?php
/* disable right block start
<!-- right column block start --> 
<td valign="top" width="25%">

</td>
<!-- right column block end -->
* end of disable right block */
?> 
      </tr>
    </table></td>
<!-- body_text_eof //-->
  </tr>
</table>
<!-- body_eof //-->

<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
<br>
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>
